var columns = [{
     label:'编号'
},{
    field:'name',
     label: '名称'
},{
    field:'desc',
    label: '描述'
}]

function initTable(){

     var tbSchool = document.getElementById('tbSchool');
    var rows='';
    var cols='';

     for(var inner in columns){
         cols+='<th>'+columns[inner].label+'</th>'
     }

     /*cols
     * th
     * th
     * th
     *  **/
     tbSchool.innerHTML
         +='<thead><tr>'+cols+'</tr></thead>';


     for(var i in schools){
         var tRow= '<tr><td>'
             +(parseInt(i)+1)
             +'</td><td>'
             +schools[i].name
             +'</td><td>'
             +schools[i].desc
             +'</td></tr>';
           rows+=tRow;
    }

     console.log(rows);

     tbSchool.innerHTML += '<tbody>'+rows+'</tbody>'
}

initTable();